//
// Created by TATO on 2025/9/11.
//

#include "http_multi_io.h"
int initPipe(int *pipefd) {
    // 1. 创建管道
    return pipe(pipefd);
}
int readPipe(int rpfd, char *buf) {
    return read(rpfd, buf, sizeof (buf) / sizeof (char));
}

int writePipe(int wpfd, char* buf) {
    return write(wpfd, buf, strlen(buf));
}

int closePipe(int pfd) {
    return close(pfd);
}